package com.s64.ch07.service.impl;

import com.s64.ch07.entity.SysUser;
import com.s64.ch07.mapper.SysUserMapper;
import com.s64.ch07.service.IScoreService;
import com.s64.ch07.service.ISysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author baomidou
 * @since 2023-11-21
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {
    @Autowired
    private IScoreService scoreService;

    @Override
    public SysUser getById(Serializable id) {
        scoreService.incrby(id);
        return super.getById(id);
    }
}
